package com.codedef.util;

/**
 * @author 孙宏宇
 * @date 2021/3/4 19:43
 */
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Component
@ConfigurationProperties(prefix = "lib2.gateway")
public class CheckPath {

    public PathNode root;

    public String[] path;

    public CheckPath(String[] path) {
        this.path = path;
    }

    public void setPath(String[] path) {
        this.path = path;
    }

    @PostConstruct
    private void createPathNode() {
        root = UriParseUtil.createPathTree(path);
    }

}
